package com.yang.SpringTest.annotation.profileLearn;

import lombok.extern.slf4j.Slf4j;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;

/**
 * <p>ProfileDemoTest测试类</p>
 *
 * @author By: chengxuyuanshitang
 * Package com.yang.SpringTest.annotation.profileLearn
 * Ceate Time 2024-04-09 17:40
 */
@Slf4j
public class ProfileDemoTest {

    public static void main (String[] args) {
        AnnotationConfigApplicationContext context = new AnnotationConfigApplicationContext ();
        context.getEnvironment ().setActiveProfiles ("development");
        context.register (ProfileDemoConfig.class);
        context.refresh ();
        ProfileDemo demo = context.getBean (ProfileDemo.class);
        log.info ("ProfileDemo is : [ {} ]", demo);
    }
}

